The technology described herein relates to methods and systems for encoding data arrays (and for decoding data streams encoding such data arrays).
It is common to encode arrays of data elements, such as arrays of image data values, so as to compress the data in order to reduce bandwidth and memory consumption. This is particularly desirable in data processing apparatus, e.g. of portable devices such as digital cameras, or mobile devices including such cameras, where processing resources and power may be limited.
In order to encode an array of data elements, the array of data elements is often divided into smaller “source” blocks of data elements and encoded on a block by block basis based on the difference between the source block and a “reference” block of data elements.
For instance, when encoding a still image, or a single video frame, the source image data is generally divided into a number of blocks that are used for the compression algorithm. The encoding is then performed by processing the blocks in the image. For instance, typically, a set of difference values compared to a reference block is determined for a block, a transform is applied (such as a discrete cosine transform) to convert the difference information for the block into a frequency-domain representation, and the transformed co-efficients (i.e. frequencies) are then quantised to achieve some of the data compression required. The quantised co-efficients can then be stored as difference values compared to a reference block. An encoded data stream including the compressed, encoded image data may thus be output, e.g. for storage in memory, or for transmission to an external device for storage or display.
The Applicants believe that there remains scope for, and a need for, more efficient arrangements for encoding data arrays and for decoding data streams encoding such data arrays.